import { HOME_SET_DATA } from './../action/actionType';

export let home = (state = {
    homeData: null,
    navList: [
        { pathname: "/home/discover", text: "发现" },
        { pathname: "/home/allRec", text: "推荐" },
        { pathname: "/home/daily", text: "日报" },
    ],
    footList: [
        { pathname: "/home", text: "首页", imgSrc1: require("../img/foot1-1.png"), imgSrc2: require("../img/foot1-2.png") },
        { pathname: "/bbs", text: "社区", imgSrc1: require("../img/foot2-1.png"), imgSrc2: require("../img/foot2-2.png") },
        { pathname: "/inform", text: "通知", imgSrc1: require("../img/foot3-1.png"), imgSrc2: require("../img/foot3-2.png") },
        { pathname: "/my", text: "我的", imgSrc1: require("../img/foot4-1.png"), imgSrc2: require("../img/foot4-2.png") },
    ],
}, action) => {
    let { type } = action;
    let newState = { ...state };
    switch (type) {
        case HOME_SET_DATA:
            newState.homeData = action.obj;
            return newState
            break;
        default:
            return newState
            break;
    }
}